/**
 * @addtogroup bsc_hj1239_common
 * bsc_hj1239_common
 * @{
 */
/**
 * @file        bsc_hj1239_common.h
 * @brief       XXXX
 * @note        XXXX
 * @author      靳普诏(puzhao.jin@hopechart.com)
 * @date        2023/10/20
 * @version     1.0

 * @par         修改日志
 * <table>
 * <tr><th>Date         <th>Version     <th>Author      <th> Description
 * <tr><td>2023/10/20   <td>1.0         <td>靳普诏       <td> 创建初始版本
 * @copyright 杭州鸿泉物联网技术股份有限公司
 */

#ifndef _BSC_HJ1239_COMMON_H_
#define _BSC_HJ1239_COMMON_H_

#include "ofc/ofc_types.h"
#include "bsc_hj1239/bsc_hj1239_chl_collect_if.h"
#include "bsc_hj1239/bsc_hj1239_chl_param_if.h"
#include "bsc_hj1239/bsc_hj1239_chl_plug_if.h"
#include "bsc_hj1239/bsc_hj1239_chl_report_if.h"
#include "bsc_hj1239/bsc_hj1239_chl_session_if.h"
#include "bsc_hj1239/bsc_hj1239_frame_param_if.h"
#include "bsc_hj1239/bsc_hj1239_collect_data.h"

#include "gbmsg17691/gbc_17691_codec.h"

#ifdef __cplusplus
extern "C"
{
#endif

enum TBsHj1239RetTag
{
    kBsHj1239RetSuccess = 0,
    kBsHj1239RetParamErr = -1,
    kBsHj1239RetCollectFail = -2,
    kBsHj1239RetMallocErr = -3,
    kBsHj1239RetQueuePushErr = -4,
    kBsHj1239RetChlParamOptErr = -5,
    kBsHj1239RetFwParamOptErr = -6,
    kBsHj1239RetBuffSizeErr = -7,
    kBsHj1239RetInterfaceNone = -8,
    kBsHj1239RetFwNotInit = -9,
    kBsHj1239RetNotSupportYet = -10,
};


#define HJ1239_PROTOCOL_CMD_LOGIN   0x01
#define HJ1239_PROTOCOL_CMD_RECORD_ACK   0x08

#define BIT_SET(flag, bit)  ((flag) | (0x1u << bit))
#define BIT_CLR(flag, bit)  ((flag) & ~(0x1u << bit))
#define BIT_IS_SET(flag, bit)  (((flag) & (0x1u << bit)) != 0)



UInt8 BsHj1239CalcXor(UInt8 *data, Int32 data_len);


#ifdef __cplusplus
}  ///< extern "C"
#endif

#endif  ///< _BSC_HJ1239_COMMON_H_

/**
 * @}  Generated on "2023-10-20 17:44:05" by the tool "gen_hq_file.py >> V20230509_1" 
 */
